<?php
namespace app\common\logic;

use think\Controller;

class MemberBonusDetail extends Controller
{
   public function get_bonus_list($userid,$start_time="",$end_time="",$start=0,$num=20){


           $where=[];
           if($start_time){
               $where['created_at']=['egt',$start_time];
           }

           if($end_time){
               $where['created_at']=['elt',$end_time];
           }
           if($start_time&&$end_time){
            $where['created_at']=['between',[$start_time,$end_time]];
            }
           return \app\common\model\MemberBonusDetail::where("member_id",$userid)->where($where)->page($start,$num)->order("created_at desc")->select();

   }
}